package xzy.dao;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import xzy.pojo.Student;
import xzy.pojo.Teacher;

@Repository("teacherMapper")
public class TeacherMapperImpl implements TeacherMapper{
    @Autowired
    private SqlSessionTemplate sqlSessionTemplate;
    public Teacher findTeacherByName(String teacherName) {
        return sqlSessionTemplate.getMapper(TeacherMapper.class).findTeacherByName(teacherName);
    }

    public int addTeacher(Teacher teacher) {
        return sqlSessionTemplate.getMapper(TeacherMapper.class).addTeacher(teacher);
    }

    public int updateTeacherPwd(Teacher teacher) {
        return sqlSessionTemplate.getMapper(TeacherMapper.class).updateTeacherPwd(teacher);
    }
}
